{anchor:msg_executemultiple_0}
!! ExecuteMultiple message
!!! Constructor
!!!! new COSA.Request.ExecuteMultiple(requests, settings, requestId)
|| Param || Type || Description ||
| requests | {{COSA.OrganizationRequestCollection}} | Requests collection |
| settings | [COSA.ExecuteMultipleSettings|COSA Namespace#lib_executemultiplesettings_0] | ExecuteMultiple request settings  |
| requestId _(optional)_ | {{string}} | Request unique identifier (GUID) |
!!! Properties
|| Name || Type ||
| requests | {{COSA.OrganizationRequestCollection}} |
| settings | [COSA.ExecuteMultipleSettings|COSA Namespace#lib_executemultiplesettings_0] |
| requestId _(optional)_ | {{string}} |
!!! Example
{code:javascript}
var be_0 = new COSA.BusinessEntity("contact", null, {
		firstname: 'Michael',
		lastname: 'Jackson',
		primaryemail:'mjackson@mail.com'}),
    createRq = new COSA.Request.Create(be_0),
    deleteRq = new COSA.Request.Delete('contact', 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'),
    execMultRqs = new COSA.OrganizationRequestCollection([createRq, deleteRq]),
    execMultSett = new COSA.ExecuteMultipleSettings(true, false),
    execMultRq = new COSA.Request.ExecuteMultiple(execMultRqs, execMultSett);

//message execution
execMultRq.execute(function ( r ) {
	//working with a response
});
//or
COSA.Request.Execute(execMultRq, function ( r ) {
	//working with a response
});
{code:javascript}

[Back to Top|#tbl_contents_0]